gtk_icon_theme_list_icons
gtk_icon_theme_get_icon_sizes
gtk_icon_paintable_get_filename
+gtk_icon_paintable_get_resource_path
gtk_icon_paintable_get_icon_name
gtk_icon_paintable_is_symbolic
<SUBSECTION Standard>
{
g_return_val_if_fail (icon != NULL, NULL);
- return icon->filename;
+ if (!icon->is_resource)
+ return icon->filename;
+ return NULL;
+}
+
+/**
+ * gtk_icon_paintable_get_resource_path:
+ * @self: a #GtkIcon
+ *
+ * Gets the resource path for the icon.
+ *
+ * Returns: (nullable) (type filename): the resource for the icon, or %NULL
+ * if the icon is not represented by a resource.
+ */
+const gchar *
+gtk_icon_paintable_get_resource_path (GtkIconPaintable *icon)
+{
+ g_return_val_if_fail (icon != NULL, NULL);
+
+ if (icon->is_resource)
+ return icon->filename;
+ return NULL;
}
/**
GType gtk_icon_paintable_get_type (void) G_GNUC_CONST;
GDK_AVAILABLE_IN_ALL
-const gchar * gtk_icon_paintable_get_filename (GtkIconPaintable *self);
+const gchar * gtk_icon_paintable_get_filename (GtkIconPaintable *self);
GDK_AVAILABLE_IN_ALL
-const gchar * gtk_icon_paintable_get_icon_name (GtkIconPaintable *self);
+const gchar * gtk_icon_paintable_get_resource_path (GtkIconPaintable *self);
GDK_AVAILABLE_IN_ALL
-gboolean gtk_icon_paintable_is_symbolic (GtkIconPaintable *self);
+const gchar * gtk_icon_paintable_get_icon_name (GtkIconPaintable *self);
+GDK_AVAILABLE_IN_ALL
+gboolean gtk_icon_paintable_is_symbolic (GtkIconPaintable *self);
G_END_DECLS